package com.yitong.equipment.ui.find

import androidx.recyclerview.widget.GridLayoutManager
import androidx.recyclerview.widget.LinearLayoutManager
import com.blankj.utilcode.util.LogUtils
import com.gyf.immersionbar.ImmersionBar
import com.yitong.equipment.R
import com.yitong.equipment.base.BaseFragment
import com.yitong.equipment.databinding.FragmentFindBinding
import com.yitong.equipment.entity.other.FindMultipleEntity
import com.yitong.equipment.ext.init
import com.yitong.equipment.ui.adapter.FindAdapter
import com.yitong.equipment.ui.adapter.HomeMenuAdapter
import com.yitong.equipment.ui.viewmodel.MyCourseViewModel

class FindFragment : BaseFragment<MyCourseViewModel, FragmentFindBinding>() {

    private val findAdapter: FindAdapter by lazy { FindAdapter(arrayListOf()) }

    override fun setContent(): Int {
        return R.layout.fragment_find
    }



    override fun initView() {
        ImmersionBar.setTitleBar(this, bindingView.findTopLayout.toolbar)
        bindingView.recycleView.init(LinearLayoutManager(activity), findAdapter, false)

        findAdapter.apply {

        }


        var mutableListOf = mutableListOf<FindMultipleEntity>()
        for (index in 0..20) {
            mutableListOf.add(FindMultipleEntity(FindMultipleEntity.LAYOUT_1))
        }
        findAdapter.setList(mutableListOf)


    }

    override fun firstLoad() {
    }

    override fun notFirstLoad() {
        super.notFirstLoad()
        LogUtils.dTag("notFirstLoad","notFirstLoad")
    }


}